import 'package:aone_common/entities/entities.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';

import '../../../theme/custom_theme.dart';
import '../game_category_controller.dart';

class StartGameButton extends StatelessWidget {
  final dynamic params;

  const StartGameButton({Key? key, required this.params}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    final ctrl = GameCategoryController.to;

    return SizedBox(
      height: 25,
      child: MaterialButton(
        onPressed: () => ctrl.onStartGame(params),
        minWidth: 0,
        padding: EdgeInsets.symmetric(
          vertical: 6.w,
          horizontal: 8.w,
        ),
        color: CustomTheme.colorSchema.tertiary,
        child: Text(
          'play.now'.tr,
          style: TextStyle(
            fontSize: 9.sp,
          ),
        ),
      ),
    );
  }
}
